/*!
 * TidyBlog 2.0
 * Link create & edit page - v1.0 (2013-10-06T11:34:50+0800)
 * https://code.google.com/p/tidyblog/ | Released under MIT license
 */
define(function(require, exports, module) { 'use strict';

var $ = require('dom/1.0.x/'),
	Validator = require('validator/1.0.x/'),
	util = require('/common/util/1.0.x/');

new Validator({
	form: $('form'),
	steps: [
		{ fields: 'LinkName', message: '链接名不能为空' },
		{ fields: 'Weight', rule: 'min:0&&max:255', message: '权重必须为0-255' },
		{ fields: 'LinkUrl', message: '链接地址不能为空' }
	],
	events: {
		submiterror: util.onSubmitError
	}
});

});